package com.xingkeduo.business.schedule.service.marketing;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.xingkeduo.business.schedule.remote.MarketingRemoteService;
import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.handler.IJobHandler;
import com.xxl.job.core.handler.annotation.JobHandler;
import com.xxl.job.core.log.XxlJobLogger;


/**
 * 
 * 类说明  卡券3天后失效消息推送
 * @author: pantong E-mail:pantong@xingkeduo.com
 * @date: 2019年6月5日 下午5:41:55
 */
@JobHandler(value="marketingThreeDaysExpiredTaskJobHandler")
@Component
public class MarketingThreeDaysExpiredTaskJobHandler extends IJobHandler {

    @Autowired
    private MarketingRemoteService marketingRemoteService;

    @Override
    public ReturnT<String> execute(String s) throws Exception {
        XxlJobLogger.log(s+"卡券3天后失效消息推送 start...");
        try{
        	marketingRemoteService.pushExpirationReminderTask();;
        }catch (Exception e){
        	XxlJobLogger.log(s+"卡券3天后失效消息推送exception...");
            XxlJobLogger.log(e.getMessage());
//            throw e;
        }
        XxlJobLogger.log(s+"卡券3天后失效消息推送 end...");
        return ReturnT.SUCCESS;
    }
}
